import 'package:beautiful_demo/common/res.dart';
import 'package:beautiful_demo/common/widget/widget.dart';
import 'package:flutter/material.dart';

import 'controller.dart';
///description:通讯录



class Item extends StatelessWidget {
  final String url;
  final String title;
  final String phone;

  const Item(this.url, this.title, this.phone, {Key key})
      : super(key: key);

  @override
  Widget build(BuildContext context) {
    return SizedBox(
      height: 84.dp,
      child: Column(
        children: [
          Expanded(
              child: Row(
                children: [
                  SizedBox(
                    width: 20.dp,
                  ),
                  CachedImageShadow(
                    url: url,
                    width: 60.dp,
                    height: 60.dp,
                    boxShadow: const [
                      BoxShadow(
                          color: Color(0x11333333),
                          offset: Offset(-2, 0),
                          blurRadius: 3)
                    ],),
                  // ClipRRect(
                  //     borderRadius: BorderRadius.circular(60.dp),
                  //     child: CachedImage(
                  //       url,
                  //
                  //       fit: BoxFit.cover,
                  //     )),
                  SizedBox(
                    width: 10.dp,
                  ),
                  Expanded(
                    child: Column(
                      crossAxisAlignment: CrossAxisAlignment.start,
                      mainAxisAlignment: MainAxisAlignment.center,
                      children: [
                        Text(
                          title,
                          style: resTextStyle.copyWith(
                              color: const Color(0xff000000),
                              fontSize: 18.sp,
                              shadows: const [
                                BoxShadow(
                                    color: Color(0x27333333),
                                    offset: Offset(0, 1),
                                    blurRadius: 3)
                              ],
                              fontWeight: FontWeight.w500),
                        ),
                        SizedBox(
                          height: 10.dp,
                        ),
                        Text(
                          phone,
                          maxLines: 1,
                          overflow: TextOverflow.ellipsis,
                          style: resTextStyle.copyWith(
                            //     shadows: const[
                            //   BoxShadow(
                            //       color: Color(0x27999999),
                            //       offset: Offset(-1, 1),
                            //       blurRadius: 3)
                            // ],
                              color: const Color(0xffaaaaaa), fontSize: 13.sp),
                        ),
                      ],
                    ),
                  ),


                  SizedBox(
                    width: 23.dp,
                  ),
                ],
              )),
          LineWidget(
            color: Color(0xf1f1f3f6),
          )
        ],
      ),
    );
  }
}
